﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeFile="UpdateFlowManager.aspx.cs"
    Inherits="admin_Flow_BackManage_UpdateFlowManager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link rel="Stylesheet" type="text/css" href="../../Styles/right_style.css" />
    <script type="text/javascript" src="../../Scripts/jquery.ui/js/jquery.js"></script>
    <style type="text/css">
            <!--
            html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
            scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
            -->
        </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="sub_right_top">
        <div class="hdm_footer">
            <div style="height: 13px; overflow: hidden;">
            </div>
            <table width="97%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#77acd0"
                style="border-collapse: collapse;">
                <tr bgcolor="#b1d5ef">
                    <td>
                        <div class="com_zdzg_word">
                            指定监控人员</div>
                        <div class="com_zdzg_list">
                            <asp:DropDownList ID="ddlSelectType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
                                Font-Size="12px">
                                <asp:ListItem Value="0">按部门选择人员</asp:ListItem>
                                <asp:ListItem Value="1">按角色选择人员</asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="com_zdzg_wordsm">
                            监控人员具有最高的流程控制权限，请谨慎指定，也可以不指定</div>
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        <table width="480" border="0" align="center" cellpadding="0" cellspacing="0" style="margin: 10px 0;">
                            <tr>
                                <td width="230" align="center">
                                    备选人员
                                </td>
                                <td width="20">
                                    &nbsp;
                                </td>
                                <td width="230" align="center">
                                    监控人员
                                </td>
                            </tr>
                            <tr>
                                <td width="230" align="center">
                                    <asp:ListBox ID="lbSellUser" runat="server" Height="250px" SelectionMode="Multiple"
                                        Width="204px" Font-Size="12px"></asp:ListBox>
                                </td>
                                <td width="20">
                                    <p>
                                        <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/to_1r.gif" OnClientClick="addOption();return false;" />
                                    </p>
                                    <p>
                                        &nbsp;</p>
                                    <p>
                                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/to_1l.gif" OnClientClick="delOption();return false;" />
                                    </p>
                                </td>
                                <td width="230" align="center">
                                    <asp:ListBox ID="lbSellManager" runat="server" Height="250px" SelectionMode="Multiple"
                                        Width="224px" Font-Size="12px"></asp:ListBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="230" align="center">
                                    <asp:Button ID="Button1" runat="server" OnClientClick="selectAll('lbSellManager');return false;"
                                        Text="" CssClass="com_all_button" />
                                </td>
                                <td width="20">
                                    &nbsp;
                                </td>
                                <td width="230" align="center">
                                    <asp:Button ID="Button3" runat="server" OnClientClick="selectAll('lbSellUser');return false;"
                                        Text="" CssClass="com_all_button" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3" align="center">
                                    <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" OnClientClick="selectAll('lbSellManager');"
                                        Text="" CssClass="queding_anniu" />
                                    <asp:Button ID="btnBack" runat="server" PostBackUrl="~/admin/Flow_BackManage/Flow_NewFlowList.aspx"
                                        Text="" CssClass="fanhui_anniu" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <div style="height: 15px; overflow: hidden;">
            </div>
        </div>
    </div>
    </form>
</body>
</html>
<script language="javascript" type="text/javascript">
    var item = document.getElementById('lbSellUser');
    var setitem = document.getElementById('lbSellManager');
    function addOption() {
        var arrayValue = new Array();
        for (var i = 0; i < item.length; i++) {
            if (item.options[i].selected) {
                var opt = new Option(item.options[i].text, item.options[i].value);
                setitem.options[setitem.length] = opt;
                arrayValue.push(item.options[i].value);
            }
        }
        for (var i = 0; i < arrayValue.length; i++) {
            for (var j = 0; j < item.length; j++) {
                if (item.options[j].value == arrayValue[i]) {
                    item.options[j] = null;
                }
            }
        }
    }
    function delOption() {
        var arrayValue = new Array();
        for (var i = 0; i < setitem.length; i++) {
            if (setitem.options[i].selected) {
                var opt = new Option(setitem.options[i].text, setitem.options[i].value);
                item.options[item.length] = opt;
                arrayValue.push(setitem.options[i].value);
            }
        }
        for (var i = 0; i < arrayValue.length; i++) {
            for (var j = 0; j < setitem.length; j++) {
                if (setitem.options[j].value == arrayValue[i]) {
                    setitem.options[j] = null;
                }
            }
        }
    }
    function selectAll(items) {
        var itemss = document.getElementById(items);
        for (var i = 0; i < itemss.options.length; i++) {
            itemss.options[i].selected = true;
        }
    }
</script>
